package com.example;

import java.net.Authenticator;
import java.net.PasswordAuthentication;

public class App {
    public static void main(String[] args) {
//        final String authUser = "dave";
//        final String authPassword = "123456";
//
//        System.setProperty("http.proxyHost", "192.168.12.67");
//        System.setProperty("http.proxyPort", "3128");
//        System.setProperty("http.proxyUser", authUser);
//        System.setProperty("http.proxyPassword", authPassword);
//        System.setProperty("https.proxyHost", "192.168.12.67");
//        System.setProperty("https.proxyPort", "3128");
//        System.setProperty("https.proxyUser", authUser);
//        System.setProperty("https.proxyPassword", authPassword);
//        System.setProperty("jdk.http.auth.tunneling.disabledSchemes", "");
//        System.setProperty("jdk.http.auth.proxying.disabledSchemes", "");
////        System.setProperty("https.proxyHost", "xxxx");
////        System.setProperty("https.proxyPort", "xxx");
////        System.setProperty("https.proxyUser", xxx);
////        System.setProperty("https.proxyPassword", xxx);
//
//        Authenticator.setDefault(
//                new Authenticator() {
//                    public PasswordAuthentication getPasswordAuthentication() {
//                        return new PasswordAuthentication(authUser, authPassword.toCharArray());
//                    }
//                }
//        );
//        System.setProperty("java.net.useSystemProxies", "true");
        String content = ProxyTest.fetchContent();
        System.out.println(content);
    }
}
